When starting a preview from the print dialog, set the action to PREVIEW.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 16 Jun 2006 16:36:25 +0000 (16:36 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 16 Jun 2006 16:36:25 +0000 (16:36 +0000)
2006-06-16  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkprintoperation-unix.c (handle_print_response): When starting
a preview from the print dialog, set the action to PREVIEW.

* gtk/gtkprintoperation.c: Cosmetic changes.

ChangeLog
ChangeLog.pre-2-10
gtk/gtkprintoperation-unix.c
gtk/gtkprintoperation.c

index d93482da74e2fa85767262609ad49af5c1c9557d..b619635eaa27fa6d24ef155e973182db34465700 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-06-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkprintoperation-unix.c (handle_print_response): When starting
+       a preview from the print dialog, set the action to PREVIEW.
+
+       * gtk/gtkprintoperation.c: Cosmetic changes.
+
 2006-06-16 Matthias Clasens  <mclasen@redhat.com>
 
        * gtk/gtkprintoperation-unix.c: Mark the preview filename
index d93482da74e2fa85767262609ad49af5c1c9557d..b619635eaa27fa6d24ef155e973182db34465700 100644 (file)
@@ -1,3 +1,10 @@
+2006-06-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkprintoperation-unix.c (handle_print_response): When starting
+       a preview from the print dialog, set the action to PREVIEW.
+
+       * gtk/gtkprintoperation.c: Cosmetic changes.
+
 2006-06-16 Matthias Clasens  <mclasen@redhat.com>
 
        * gtk/gtkprintoperation-unix.c: Mark the preview filename
index 69676c3b6068d76d4222d18a4809357fccd12b10..0de8add643cf5b5a4a64a46ecb8e8b14c250f92b 100644 (file)
@@ -471,6 +471,8 @@ handle_print_response (GtkWidget *dialog,
       rdata->result = GTK_PRINT_OPERATION_RESULT_APPLY;
       rdata->do_preview = TRUE;
       rdata->do_print = TRUE;
+
+      rdata->op->priv->action = GTK_PRINT_OPERATION_ACTION_PREVIEW;
     }
 
   if (rdata->do_print)
index 5921b0f36909cde7c3848e64acc314dd67f3ece2..001ab3f4970570871622d0ac9305c95b605a609f 100644 (file)
@@ -1840,10 +1840,9 @@ typedef struct
 
   gint page, start, end, inc;
 
-  gboolean initialized;
-
   GtkWidget *progress;
  
+  gboolean initialized;
   gboolean is_preview; 
 } PrintPagesData;
 
@@ -2194,7 +2193,7 @@ print_pages (GtkPrintOperation       *op,
 
   data = g_new0 (PrintPagesData, 1);
   data->op = g_object_ref (op);
-  data->is_preview = (op->priv->action == GTK_PRINT_OPERATION_ACTION_PREVIEW);
+  data->is_preview = (priv->action == GTK_PRINT_OPERATION_ACTION_PREVIEW);
 
   if (priv->show_progress)
     {
@@ -2221,7 +2220,7 @@ print_pages (GtkPrintOperation       *op,
       
       g_signal_emit_by_name (op, "preview",
                             GTK_PRINT_OPERATION_PREVIEW (op),
-                            op->priv->print_context,
+                            priv->print_context,
                             parent,
                             &handled);